/******************扩展Datagrid formatter***********************/
var Formatter = {

	// Date月份，日前面加0
	FormatDateBehindAndZero:function(arg){
				if (arg == undefined || arg == '') {
			        return '';
			    }

			    var re = arg + '';
			    if (re.length < 2) {
			        re = '0' + re;
			    }

			    return re;
			},
		  
  
    //EasyUI用DataGrid用日期格式化
    DateFormatter: function (value, rec, index) {
        if (value == undefined||value==null) {
            return "";
        }else{
        	var date = new Date(value);
        	 var month = date.getMonth() + 1;
             var day = date.getDate();
        	return date.getFullYear() + '-' + Formatter.FormatDateBehindAndZero(month) + '-'
        	+ Formatter.FormatDateBehindAndZero(day);
        }
    }
 

};

